#include<stdio.h>
#include<string.h>
#define max(a,b) (a>=b ? a : b)
int a[85] = {-1}, b[85] = {-1};
char A[85], B[85];
int* copy(char *s, int len, int a[])
{
    int i;
    for(i=0;i<len;i++)
        a[i] = s[len-i-1] - '0';
    return a;
}
int main()
{
    scanf("%s%s", A, B);
    int Abit = strlen(A), Bbit = strlen(B);
    int i, opr = 0;
    if(Abit > Bbit) opr = 1;
    else if(Abit < Bbit) opr = -1;
    else
    {
        for(i=0;i<Abit && opr==0;i++)
        {
            if(A[i]>B[i]) opr = 1;
            else if(A[i]<B[i]) opr = -1;
        }
    }
    if(opr==0)
    {
        printf("0");
        return 0;
    }
    else if(opr==1)
    {
        copy(A,Abit,a);
        copy(B,Bbit,b);
    }
    else
    {
        copy(A,Abit,b);
        copy(B,Bbit,a);
        int t;
        t = Bbit, Bbit = Abit, Abit = t;
        printf("-");
    }
    for(i=0;i<Abit;i++)
    {
        a[i] -= b[i];
        if(a[i]<0)
        {
            a[i] += 10;
            a[i+1]--;
        }
    }
    while(a[Abit] == 0) Abit--;
    for(i=Abit;i>=0;i--)
        printf("%d", a[i]);   
    return 0;
}